

import java.rmi.Naming;
import java.rmi.RemoteException;
import java.util.List;

import remoto.ContratoTO;
import remoto.IGestion;

public class BD {

	IGestion gestion;
	
	public void LookupService(String url) {
		try {
			String vinculo = "//".concat(url.trim().concat("/gestion"));
			gestion = (IGestion) Naming.lookup(vinculo);
			System.out.println("Vinculo: " + vinculo);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public String getConvenioMayorMonto() throws RemoteException {
		String result = gestion.getConvenioDeMayorMonto();
		return result;
	}
	public List<ContratoTO> getContratosDeCoordinadoras() throws RemoteException {
		List<ContratoTO> c = gestion.getContratosDeCoordinadoras();
		return c;
	}
}
